<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
<script src="http://libs.baidu.com/jquery/2.0.0/jquery.js"></script>
<link rel="stylesheet" href="/layui/css/layui.css">
<script src="/layui/layui.js"></script>
<style type="text/css">
	.layui-table-tips-main{display:none}
	.layui-table-tips-c{display:none}
	html,body,div{margin: 0;padding: 0;height: 99%;}
</style>
</head>
<body class="layui-layout-body">
<div class="layui-form" style="margin: 10px; overflow: auto; height: 100%;">
  <table class="layui-table">
    <colgroup>
      <col>
      <col>
      <col>
      <col>
      <col width="80">
      <col width="120">
      <col width="165">
      <col width="100">
      <col width="100">
    </colgroup>
    <thead>
      <tr>
        <th>账号</th>
        <th>姓名</th>
        <th>电话</th>
        <th>邮箱</th>
        <th>性别</th>
        <th>身份</th>
        <th>入群时间</th>
        <th>账号状态</th>
        <!-- 
        <th th:if="${isbanned}==1">操作</th>
         -->
      </tr> 
    </thead>
    <tbody>
      <tr th:each="group:${groupNumber}" th:if="${groupNumber}!=null">
        <td>[[${group.account}]]</td>
        <td>[[${group.name}]]</td>
        <td>[[${group.phone}]]</td>
        <td>[[${group.email}]]</td>
        <td th:if="${group.sex==0}">保密</td>
        <td th:if="${group.sex==1}">男</td>
        <td th:if="${group.sex==2}">女</td>
        <td>[[${group.persignature}]]</td>        
        <td>[[${group.createtime}]]</td>        
        <td th:if="${group.isbanned==0}" th:id="'group'+${group.account}">正常</td>
        <td th:if="${group.isbanned==1}">被禁言</td>
        <!-- 
        <th th:if="${isbanned}==1"><a th:if=" ${group.isbanned}==0" class="layui-btn layui-bg-red layui-btn-xs" lay-event="report" th:attr="onclick='reportUser('+${account}+','+${group.account}+');'">封禁好友</a></th>      
         -->
      </tr>
      <tr th:if="${#lists.isEmpty(groupNumber)}">
        <td colspan="8" style="text-align: center;">该群聊以人去群空了</td>
      </tr>
    </tbody>
  </table>
</div>
<script type="text/javascript">
	var tableIns ;
	var layer ;
	layui.use(['layer', 'form', 'table','element'], function(){
		  var table = layui.table;
		  var form = layui.form;
		  var element = layui.element;
		  layer=layui.layer;
	});
	function reportUser(account,uaccount){
		layer.open({
	        title: '信息'
	        , btn: ['确定']
			, area: ['440px','565px']
	        , content: "是否封禁该账号？"
	        ,success: function(layero, index){
	          form.render('select');
	        }, yes: function (index) {
	        	parent.layer.close(index);
	        }
		});
		$("#group"+uaccount).html('被封禁');
	}
</script>
</body>
</html>